package base;


import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.util.Vector;

import javax.swing.JPanel;

public class PanelColor extends JPanel{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	Color cor;	
	Vector<Integer> posX;
	Vector<TempObject> posX2;


	public PanelColor(Color color) {
		this.cor = color;
		this.setBackground(color);
		posX = new Vector<Integer>();
		posX2 = new Vector<TempObject>();

	}

	public void setPosX(Vector<Integer> vector){
		this.posX = vector;
	}

	public void setPosX2(Vector<TempObject> vector){
		this.posX2 = vector;
	}

	@Override
	public void paint(Graphics g1) {
		Graphics2D g = (Graphics2D)g1;
		g.setColor(this.cor);
		g.fill(new Rectangle2D.Double(0, 0, getWidth(), getHeight()));
		g.setColor(Color.black);
		for(int i = 0; i < posX2.size();i++){
			//no cin subtrai 18
			g.fill(new Rectangle2D.Double(posX2.get(i).x /*- 18*/- 14, 0, 1, getHeight()));
		}


	}
}
